from toast.models import *
from django.contrib import admin
from django import forms


class MemberAdmin(admin.ModelAdmin):
	fieldsets=[
		("Basic Information",	{'fields':['first_name','last_name']}),
		("Contact Information",	{'fields':['email','phone']}),
	]

class StateAdmin(admin.ModelAdmin):
	fieldsets=[
		(None, 	{'fields':['short_name','long_name']}),
	]

class AddressAdmin(admin.ModelAdmin):
	fieldsets=[
		("Descriptive Name",	{'fields':['name']}),
		("Address", 			{'fields':['street_address','city', 'state', 'postalcode']})
	]

class MeetingAdmin(admin.ModelAdmin):
	fieldsets=[
		("Meeting Name",	{'fields':['name']}),
		("Address",		{'fields':['address']}),
		("Meeting Start",	{'fields':['start_datetime']}),
		("Meeting End",	 	{'fields':['end_datetime']}),
	]

class RoleAdmin(admin.ModelAdmin):
	fieldsets=[
		(None, 	{'fields':['name']}),
	]

class AttendanceAdmin(admin.ModelAdmin):
	fieldsets=[
		("Meeting Information",	{'fields':['meeting']}),
		("Member Information",	{'fields':['member','role']}),
	]

class SoundAdmin(admin.ModelAdmin):
	fieldsets=[
		(None,	{'fields':['name']}),
	]

class ParticipationTypeAdmin(admin.ModelAdmin):
	fieldsets=[
		(None,	{'fields':['name','description']}),
	]

class ParticipationAdmin(admin.ModelAdmin):
	fieldsets=[
		(None,	{'fields':['attendance','participation_type']}),
	]

class CommentAdmin(admin.ModelAdmin):
	fieldsets=[
		(None,	{'fields':['observer','participant','body']}),
	]

class TrackSoundAdmin(admin.ModelAdmin):
	fieldsets=[
		(None,	{'fields':['sound','participant','count']}),
	]

admin.site.register(Member, MemberAdmin)
admin.site.register(State, StateAdmin)
admin.site.register(Address, AddressAdmin)
admin.site.register(Meeting, MeetingAdmin)
admin.site.register(Role, RoleAdmin)
admin.site.register(Attendance, AttendanceAdmin)
admin.site.register(Sound, SoundAdmin)
admin.site.register(ParticipationType, ParticipationTypeAdmin)
admin.site.register(Participation, ParticipationAdmin)
admin.site.register(Comment, CommentAdmin)
admin.site.register(TrackSound, TrackSoundAdmin)